using Godot;

namespace MyCraft2;

public static class InputMapExtend
{
    public static void AddAction(StringName action, InputEvent? @event = null)
    {
        if (!InputMap.HasAction(action))
            InputMap.AddAction(action);

        if (@event is not null) InputMap.ActionAddEvent(action, @event);
    }
}